<template>
	<view class="yinsixieyi">
		<text class="yinsixieyi-title">服务协议和隐私政策</text>
		<view class="yinsixieyi-info"> 感谢您对找零工一直以来的信任! 我们依据《微信小程序平台运营规范》更新了找零工的《隐私协议》，特向您说明如下: <view class="">
				1.基于您的明示授权，我们会获取您的手机号码，为您提供及时通讯、账号生成等信息，您有权拒绝或取消授权； </view>
			<view class=""> 2.基于您的明示授权，我们可能会获取您的位置，为您提供附近的任务、任务距离等信息，您有权拒绝或取消授权； </view>
			<view class=""> 3.我们会采取专业的安全措施保护您的信息安全; 点击阅读《用户协议》和《隐私协议》 </view>
		</view>
		<view style="flex-direction: row;width: 534rpx;"><text class="yinsixieyi-infos">点击阅读</text><text
				class="yinsixieyi-infos" @click="handleOpenArticle(0)" style="color: #0091FF;">《用户协议》</text><text
				class="yinsixieyi-infos">和</text><text class="yinsixieyi-infos" @click="handleOpenArticle(1)"
				style="color: #0091FF;">《隐私协议》</text></view>
		<view class="yinsixieyi-button">
			<view class="yinsixieyi-button1" @click="onCancelClick()">不同意</view>
			<view class="yinsixieyi-button2" @click="onConfirmClick()">同意</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				detailPrivacyT: '', //隐私标题
				detailService: '', //服务
			}
		},
		methods: {
			// 协议
			handleOpenArticle(flag) {
				if (flag == 0) {
					uni.navigateTo({
						url: '/pages/user-agreement/service-agreement'
					})
				} else if (flag = 1) {
					uni.navigateTo({
						url: '/pages/user-agreement/privacy-agreement'
					})
				}
			},
			// 用户不同意协议
			onCancelClick() {
				// plus.runtime.quit();
				// uni.setStorageSync('first-is', true)
				uni.switchTab({
					url: '/pages/index/index'
				})
				// onCancelClick() {
				// 	this.isShow = false
				// 	this.agree = false
				// },
				// onConfirmClick() {
				// 	this.isShow = false
				// 	this.agree = true
				// },
				uni.setStorageSync('agree', false)
			},
			//弹窗点击事件
			onConfirmClick() {
				uni.setStorageSync('agree', true)
				uni.setStorageSync('first-is', true)
				if (uni.getStorageSync('userType') == 1) {
					uni.redirectTo({
						url: '/pages/login/login'
					})
				} else {
					uni.redirectTo({
						url: '/pages/login/login'
					})
				}
			},
		},
	}
</script>
<style scoped>
	.yinsixieyi {
		width: 630rpx;
		/* height: 762rpx; */
		background: #FFFFFF;
		border-radius: 20rpx;
		z-index: 100;
		align-items: center;
	}

	.yinsixieyi-title {
		font-size: 40rpx;
		font-weight: bold;
		color: #010000;
		margin-top: 68rpx;
	}

	.yinsixieyi-info {
		margin: 48rpx 48rpx 0 48rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #010000;
		line-height: 48rpx;
	}

	.yinsixieyi-infos {
		margin-bottom: 48rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #010000;
		line-height: 48rpx;
	}

	.yinsixieyi-button {
		width: 534rpx;
		height: 78rpx;
		justify-content: space-between;
		flex-direction: row;
		margin-top: 12rpx;
		margin-bottom: 30rpx;
	}

	.yinsixieyi-button1 {
		width: 248rpx;
		height: 77rpx;
		border: 1rpx solid #787878;
		border-radius: 8rpx;
		justify-content: center;
		align-items: center;
	}

	.yinsixieyi-button2 {
		width: 248rpx;
		height: 78rpx;
		background: #FDC928;
		border-radius: 8rpx;
		justify-content: center;
		align-items: center;
	}
</style>